﻿Public Class ConvertDate
    Public Function Convert2String(ByVal datevalue As DateTime) As String
        Dim strDate As String = ""
        Dim strTemp As String = ""

        strDate = datevalue.Year.ToString()

        strTemp = datevalue.Month.ToString()
        If (Len(strTemp) = 1) Then
            strTemp = "0" & strTemp
        End If
        strDate += strTemp

        strTemp = datevalue.Day.ToString()
        If (Len(strTemp) = 1) Then
            strTemp = "0" & strTemp
        End If
        strDate += strTemp

        Return strDate
    End Function
End Class
